<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>我的订单 - 环保商城</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: Arial, sans-serif;
      line-height: 1.6;
      background-color: #f0f0f0;
      flex-direction: column;
      min-height: 100vh;
      display: flex;
    }

    .container {
      width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
    }

    header {
      background-color: rgb(11, 169, 232);
    }
    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: rgb(11, 169, 232);
      color: #fff;
      padding: 10px 0;
    }

    .logo {
      display: flex;
      align-items: center;
    }

    .logo img {
      width: 80px;
      height: auto;
      margin-right: 10px;
    }

    .logo span {
      font-size: 24px;
      font-weight: bold;
    }

    nav ul {
      list-style-type: none;
      padding: 0;
      text-align: right;
    }

    nav ul li {
      display: inline-block;
      margin-left: 20px;
    }

    nav ul li:first-child {
      margin-left: 0;
    }

    nav ul li a {
      color: #fff;
      text-decoration: none;
      padding: 10px 15px;
      display: block;
    }

    nav ul li a:hover {
      background-color: rgba(255, 255, 255, 0.1);
      border-radius: 5px;
    }

    .orders {
      margin-top: 20px;
    }

    .order {
      background-color: #fff;
      border: 1px solid #ddd;
      margin-bottom: 20px;
      padding: 20px;
      position: relative;
    }

    .order-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }

    .order-details {
      display: flex;
      align-items: center;
    }

    .order-details h3 {
      margin-right: 20px;
      font-size: 18px;
    }

    .order-details p {
      color: #007bff;
      font-weight: bold;
    }

    .order-products {
      margin-top: 10px;
      border-top: 1px solid #ddd;
      padding-top: 10px;
    }

    .product {
      display: flex;
      margin-bottom: 10px;
    }

    .product img {
      width: 80px;
      height: auto;
      margin-right: 10px;
    }

    .product-info {
      flex: 1;
    }

    .product-info h4 {
      margin: 0;
      font-size: 16px;
    }

    .product-info p {
      color: #007bff;
      font-weight: bold;
    }

    .delete-btn {
      position: absolute;
      top: 90px;
      right: 10px;
      background-color: #dc3545;
      color: #fff;
      border: none;
      padding: 5px 10px;
      cursor: pointer;
      border-radius: 5px;
    }

    footer {
      background-color: #333;
      color: #fff;
      text-align: center;
      padding: 10px 0;
      width: 100%;
      margin-top: auto;
      /*position: sticky;*/
      /*bottom: 0;*/
    }
  </style>
</head>
<body>
<header>
  <div class="container">
    <div class="header">
      <div class="logo">
        <img src="./static/img.png" alt="环保商城">
        <span>环保商城</span>
      </div>
      <nav>
        <ul>
          <li><a href="#">首页</a></li>
          <li><a href="#">分类</a></li>
          <li><a href="#">购物车</a></li>
          <li><a href="#">我的订单</a></li>
          <li><a href="#">地址管理</a></li>
          <li><a href="#">登录</a></li>
          <li><a href="#">注册</a></li>
        </ul>
      </nav>
    </div>
  </div>
</header>
<div class="container">
  <section class="orders">
    <h2>我的订单</h2>
    <div class="order">
      <div class="order-header">
        <div class="order-details">
          <h3>订单编号: #123456</h3>
          <p>下单时间: 2024-07-13 10:30:00</p>
        </div>
        <p>订单金额: <strong>￥200.00</strong></p>
        <button class="delete-btn" onclick="deleteOrder(this)">删除</button>
      </div>

      <div class="order-products">
        <div class="product">
          <img src="https://via.placeholder.com/80" alt="商品图">
          <div class="product-info">
            <h4>商品名称1</h4>
            <p>单价: ￥100.00</p>
            <p>数量: 2</p>
          </div>
        </div>
      </div>
    </div>
  </section>
</div>

<footer>
  <div class="container">
    <p>&copy; 2024 环保商城. 版权所有.</p>
  </div>
</footer>

<script>
  function deleteOrder(button) {
    const order = button.closest('.order');
    order.remove();
  }
</script>

</body>
</html>
